package com.polaris.live.utils.zego.listener

import im.zego.zegoexpress.constants.ZegoPlayerState
import im.zego.zegoexpress.constants.ZegoRemoteDeviceState
import im.zego.zegoexpress.entity.ZegoPlayStreamQuality
import org.json.JSONObject

/**
 * OnLivePlayListener  播放全部基本回调
 * @author Created by 天晴 on 2024/1/27 15:02
 * @since 1.0.0
 **/
interface OnLivePlayListener {

    /**
     * 流开始播放
     */
    fun onPlayStart()

    /**
     * 流结束播放
     */
    fun onPlayStop()

    fun onPlayerRenderVideoFirstFrame()

    /**
     * 播放器状态
     */
    fun onPlayerStateUpdate(
        state: ZegoPlayerState?,
        errorCode: Int,
        extendedData: JSONObject?
    )

    /**
     * 远端流状态
     */
    fun onRemoteSpeakerStateUpdate(state: ZegoRemoteDeviceState)

    /**
     * 播放帧率更新
     */
    fun onPlayerQualityUpdate(quality: ZegoPlayStreamQuality)
}